open ssl : letsencrypt - certbot Hint

# certbot certonly --webroot -w /home/testdomain/public_html -d www.testdomain.com

 

Saving debug log to /var/log/letsencrypt/letsencrypt.log

Plugins selected: Authenticator webroot, Installer None

Enter email address (used for urgent renewal and security notices)

 (Enter 'c' to cancel): owl@owl.co.kr

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Please read the Terms of Service at

https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must

agree in order to register with the ACME server at

https://acme-v02.api.letsencrypt.org/directory

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(A)gree/(C)ancel: A

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Would you be willing, once your first certificate is successfully issued, to

share your email address with the Electronic Frontier Foundation, a founding

partner of the Let's Encrypt project and the non-profit organization that

develops Certbot? We'd like to send you email about our work encrypting the web,

EFF news, campaigns, and ways to support digital freedom.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(Y)es/(N)o: Y

 

Obtaining a new certificate

Performing the following challenges:

http-01 challenge for www.testdomain.com

Using the webroot path /home/testdomain/public_html for all unmatched domains.

Waiting for verification...

Cleaning up challenges

Subscribe to the EFF mailing list (email: owl@owl.co.kr).

 

IMPORTANT NOTES:

 - Congratulations! Your certificate and chain have been saved at:

   /etc/letsencrypt/live/www.testdomain.com/fullchain.pem

 

   Your key file has been saved at:

   /etc/letsencrypt/live/www.testdomain.com/privkey.pem

   Your cert will expire on 2021-04-11. To obtain a new or tweaked

   version of this certificate in the future, simply run certbot

   again. To non-interactively renew *all* of your certificates, run

   "certbot renew"

 - Your account credentials have been saved in your Certbot

   configuration directory at /etc/letsencrypt. You should make a

   secure backup of this folder now. This configuration directory will

   also contain certificates and private keys obtained by Certbot so

   making regular backups of this folder is ideal.

 - If you like Certbot, please consider supporting our work by:

 

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate

   Donating to EFF:                    https://eff.org/donate-le

--------------------------------------------

 

# ll /etc/letsencrypt/live/www.testdomain.com

합계 4

-rw-r--r-- 1 root root 692  1월 11 20:07 README

lrwxrwxrwx 1 root root  43  1월 11 20:07 cert.pem -> ../../archive/www.testdomain.com/cert1.pem

lrwxrwxrwx 1 root root  44  1월 11 20:07 chain.pem -> ../../archive/www.testdomain.com/chain1.pem

lrwxrwxrwx 1 root root  48  1월 11 20:07 fullchain.pem -> ../../archive/www.testdomain.com/fullchain1.pem

lrwxrwxrwx 1 root root  46  1월 11 20:07 privkey.pem -> ../../archive/www.testdomain.com/privkey1.pem

 

--------------------------------------------

# vi /etc/httpd/conf/httpd.conf

 

<VirtualHost *:443>

ServerName www.testdomain.com

DocumentRoot /home/testdomain/public_html

 

AddDefaultCharset UTF-8

SSLEngine on

SSLProtocol all -SSLv2

SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW

SSLCertificateFile /etc/letsencrypt/live/www.testdomain.com/cert.pem

SSLCertificateKeyFile /etc/letsencrypt/live/www.testdomain.com/privkey.pem

SSLCertificateChainFile /etc/letsencrypt/live/www.testdomain.com/chain.pem

SetEnvIf User-Agent ¡°.*MSIE.*¡± nokeepalive ssl-unclean-shutdown

</VirtualHost>

 

--------------------------------------------

# certbot renew

--------------------------------------------

 

# systemctl list-timers

--------------------------------------------

# vi /etc/cron.d/ssl

0 1 1 * * root certbot renew --renew-hook="systemctl reload httpd.service"

--------------------------------------------